//
//  AKPBaseViewController.m
//  Copy_AiKapPu_Personal_OC
//
//  Created by taojianz on 2017/7/12.
//  Copyright © 2017年 taojianz. All rights reserved.
//

#import "AKPBaseNavigationViewController.h"
#import <nbappdev/nbappdev.h>

@interface AKPBaseNavigationViewController ()

@end

@implementation AKPBaseNavigationViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.navigationBar.tintColor = UIColorFromrgb(53, 53, 53, 1);
    
    
    // 设置栈底控制器的backButtonItem
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
    
    self.childViewControllers.firstObject.navigationItem.backBarButtonItem = backItem;

}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    
    if (self.childViewControllers.count > 0){
        [viewController setHidesBottomBarWhenPushed:YES];
        
        UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
        
        viewController.navigationItem.backBarButtonItem = backItem;
    }
    
    
    [super pushViewController:viewController animated:animated];
}

@end
